package com.edgar.baselibrary.network.response;

import com.edgar.baselibrary.network.ResponseException;

/**
 * Created by edgar on 2016/1/22.
 */
public interface IResponse<T> {

    /**
     * 在请求的当前线程中做数据的解析
     * @param result
     */
    public void processResponse(String result);
    public void processError(ResponseException error);

    public int getExecuteStatus();
    public int getStatusCode();
    public String getErrorMessage();
    public T getValues();

    public interface ResponseCallback<T>{
        public void onRequestFinish();
        public void onSuccess(T result);
        public void onFailure(int errorCode,String errorMsg);
    }
}